export function  isEmpty(value, text) {
  if (value === '') return text;
  return false;
}

export function isTelphone (value, text) {
  if (!/^((\(\d{2,3}\))|(\d{3}\-))?1[^012][\d*]{9}$/.test(value)) {
    return text;
  }
  return false;
}

export function isEmail (value, text) {
  if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value)) {
    return text;
  }
  return false;
}

export function  isIdCard (value, text) {
  if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
    return text;
  }
  return false;
}

export function  isBankCard(value, text) {
  if (!/^([1-9]{1})(\d{14}|\d{15}|\d{16}|\d{17}|\d{18})$/.test(value)) {
    return text;
  }
  return false;
}
